package com.cn.goodsadmin.service;

import com.cn.goodsadmin.po.Share;
import com.cn.goodsadmin.po.Sharedic;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("ShareService")
public class ShareService extends BaseService{

    public void saveShare(Share share)throws Exception{
        shareDao.save(share);
    }

    public void deleteShare(Share share)throws Exception{
        shareDao.delete(share);
    }

    public void  updateShare(Share share)throws Exception{
        shareDao.update(share);
    }

    public List<Share> findAllShare(int appid)throws Exception{
        return shareDao.findAllShareByAppid(appid);
    }

    public List<Sharedic> findAllShareDic()throws Exception{
        return shareDicDao.findAllShareDic();
    }

}
